package com.smh.genericity.fanxingMethod;

import org.junit.Test;

/**
 * @description: 类中的泛型方法
 * @author: shenmhk
 * @create: 2020-10-23 13:01
 */
public class A<T, E> {
    T t;
    {
        T t1;
    }
    A(T t){
        this.t = t;
    }

    public void test1(){
        System.out.println(this.t);
    }

    public void test2(T t,E e){
        System.out.println(t);
        System.out.println(e);
    }

    @Test
    public void run(){
        A<Integer,String> a = new A<Integer,String>(1);
        a.test1();
        a.test2(2,"ds");
    }

    static class B<T>{
        T t;
        public void go(){
            System.out.println(t);
        }
    }
}


